================================================================================
Replication Package
================================================================================

Title:    Effects of land acknowledgments on non-Indigenous audiences in
	  Australia and the United States

Journal:  Nature Human Behaviour

Authors:  Lachlan McNamee (lachlan.mcnamee@monash.edu); Kyle Peyton (kyle.peyton@unimelb.edu.au)

================================================================================
Overview
================================================================================

This replication package contains all code and data needed to reproduce the
figures, tables, and statistical results reported in the manuscript and
Supplementary Information (SI) appendix.

The package includes:
  - 11 R scripts (00-10) that reproduce all analyses
  - Survey datasets for Study 1 (audience effects) and Study 2 (practitioner
    effects) from Australia and the United States
  - Supplementary datasets (population benchmarks, expert survey, corporate
    text analysis data, institutional adoption records)

Note: Figures S1-S3 and S6 in the SI appendix are screenshots/images and are
not reproduced by the replication scripts. The first computationally reproduced
SI figure is Figure S4.

================================================================================
Software Requirements
================================================================================

R version >= 4.1.0

Required CRAN packages:
  tidyverse, lubridate, estimatr, grf, lavaan, ggthemes, ggforce, ggh4x, 
  coefplot, lemon, xtable, textclean, quanteda, quanteda.textstats,
  psych, MBESS, broom, margins, scales, SuperLearner, gam, ranger, earth

Required GitHub packages (install with devtools::install_github()):
  crossEstimation    devtools::install_github("swager/crossEstimation")
  npcausal           devtools::install_github("ehkennedy/npcausal")
  autumn             devtools::install_github("aaronrudkin/autumn")

================================================================================
Scripts
================================================================================

Scripts should be run in numerical order. Set your working directory to this
replication folder before running any script (e.g., setwd("path/to/replication")).

00_setup.R
    Purpose:  Load packages, define helper functions, set output paths, and
              load the primary survey dataset. Sourced at the top of every
              other script.
    Inputs:   combined_data.rds
    Outputs:  None (setup only)

01_manuscript.R
    Purpose:  Reproduce all main manuscript figures and tables.
              Must be run before script 06.
              Corresponds to Sections 2-4 of the manuscript.
    Inputs:   combined_data.rds (via 00_setup.R),
              asx_results_2019to2024.rds,
              unis_and_museums.rds
    Outputs:  Figures/fig1.pdf  (Figure 1: land acknowledgment trends)
              Figures/fig2.pdf  (Figure 2: baseline means)
              Figures/fig3.pdf  (Figure 3: Study 1 ATEs)
              Figures/fig4.pdf  (Figure 4: Study 2 ATEs)
              Tables/table1.tex (Table 1)
              ates_study1_by_sample_unadj.rds (pipeline input for script 06)

02_si_s1_demographics.R
    Purpose:  Sample representativeness tables comparing survey samples to
              population benchmarks and national surveys (AES, CES, ANES).
              Corresponds to SI Section S1.1, Tables S1-S5.
    Inputs:   combined_data.rds (via 00_setup.R),
              aus_target.rds, aes_2022.rds, au_election_polls.rds,
              usa_target.rds, anes_2024.rds, ces_2024.rds
    Outputs:  Tables/table_s1.tex (Table S1: AU sample vs. AES comparison)
              Tables/table_s2.tex (Table S2: AU party support)
              Tables/table_s3.tex (Table S3: AU GCCSA regional distribution)
              Tables/table_s4.tex (Table S4: US sample vs. CES/ANES comparison)
              Tables/table_s5.tex (Table S5: US 7-point PID)

03_si_s1_measurement.R
    Purpose:  Measurement quality assessment: internal reliability (alpha,
              omega), confirmatory factor analysis, and polychoric correlations
              for all multi-item scales in Studies 1 and 2.
              Corresponds to SI Sections S1.3.1 and S1.4.1.
    Inputs:   combined_data.rds (via 00_setup.R)
    Outputs:  Figures/fig_s4.pdf (Figure S4: Study 1 correlation matrix)
              Figures/fig_s5.pdf (Figure S5: Study 2 correlation matrix)
              Tables/table_s6.tex  (Table S6:  Study 1 reliability by sample)
              Tables/table_s7.tex  (Table S7:  Study 1 CFA loadings, part 1)
              Tables/table_s8.tex  (Table S8:  Study 1 CFA loadings, part 2)
              Tables/table_s9.tex  (Table S9:  Study 2 reliability by sample)
              Tables/table_s10.tex (Table S10: Study 2 CFA loadings)

04_si_s1_prevalence_expert.R
    Purpose:  Land acknowledgment prevalence in corporate annual reports,
              benchmarking survey estimates against national polls, and
              expert survey results.
              Corresponds to SI Sections S1.5.1, S1.5.2, and S1.7.
    Inputs:   combined_data.rds (via 00_setup.R),
              asx_results_2019to2024.rds, expert_survey.rds
    Outputs:  Tables/table_s11.tex (Table S11)
              Tables/table_s12.tex (Table S12)
              Tables/table_s13.tex (Table S13)
              Tables/table_s14.tex (Table S14)
              Tables/table_s15.tex (Table S15)
              Tables/table_s16.tex (Table S16)
              Figures/fig_s7.pdf   (Figure S7: expert beliefs)
              Figures/fig_s8.pdf   (Figure S8: expert guess Study 1)
              Figures/fig_s9.pdf   (Figure S9: expert guess Study 2)

05_si_s2_baseline.R
    Purpose:  Weighted baseline means, partisan sub-group comparisons,
              recall confidence distribution, predictors of belief accuracy,
              and Australian opinion poll benchmarks.
              Corresponds to SI Section S2.1.
    Inputs:   combined_data.rds (via 00_setup.R),
              aus_target.rds, usa_target.rds, aes_2022.rds, anes_2024.rds,
              ces_2024.rds, au_national_polls.rds
    Outputs:  Figures/fig_s10.pdf  (Figure S10)
              Figures/fig_s11.pdf  (Figure S11: recall confidence distribution)
              Tables/table_s17.tex (Table S17)
              Tables/table_s18.tex (Table S18)
              Tables/table_s19.tex (Table S19)
              Tables/table_s20.tex (Table S20)
              Tables/table_s21.tex (Table S21)
              Tables/table_s22.tex (Table S22)

06_si_s2_audience_effects.R
    Purpose:  Formal ATE tables, equivalence tests, covariate-adjusted
              estimates, pooled estimator, and partisan-gap benchmarking
              for Study 1.
              Corresponds to SI Section S2.2.
    Requires: 01_manuscript.R must be run first.
    Inputs:   combined_data.rds (via 00_setup.R),
              ates_study1_by_sample_unadj.rds (from 01_manuscript.R)
    Outputs:  Tables/table_s23.tex (Table S23: Study 1 ATEs by sample)
              Tables/table_s24.tex (Table S24: ATE-to-partisan-gap benchmark)
              Tables/table_s25.tex (Table S25: unadjusted vs. adjusted ATEs)
              Tables/table_s26.tex (Table S26: pooled ATEs)
              Figures/fig_s12.pdf  (Figure S12: pooled ATEs)
              ates_study1_pooled_unadj.rds (pipeline input for script 08)

07_si_s2_audience_heterogeneity.R
    Purpose:  Treatment effect heterogeneity for Study 1 using Generalized
              Random Forests (causal forests): CATEs and BLP omnibus tests.
              Corresponds to SI Section S2.2.1.
    Inputs:   combined_data.rds (via 00_setup.R)
    Outputs:  grf_calibration_au_study1.rds
              grf_preds_au_study1.rds
              grf_calibration_us_study1.rds
              grf_preds_us_study1.rds
              Figures/fig_s13.pdf  (Figure S13: CATE predictions, Australia)
              Figures/fig_s14.pdf  (Figure S14: CATE predictions, US)
              Tables/table_s27.tex (Table S27: BLP calibration, Australia)
              Tables/table_s28.tex (Table S28: BLP calibration, US)

08_si_s2_audience_iv.R
    Purpose:  Instrumental variables estimation of local average treatment
              effects (LATEs) and nonparametric ATE bounds.
              Corresponds to SI Section S2.2.2.
    Requires: 06_si_s2_audience_effects.R must be run first.
    Inputs:   combined_data.rds (via 00_setup.R),
              ates_study1_pooled_unadj.rds (from 06_si_s2_audience_effects.R)
    Outputs:  Tables/table_s29.tex (Table S29)
              Tables/table_s30.tex (Table S30)

09_si_s2_practitioner_effects.R
    Purpose:  Formal ATE tables, estimates by vignette type, and covariate-
              adjusted estimates for Study 2.
              Corresponds to SI Section S2.3.
    Inputs:   combined_data.rds (via 00_setup.R)
    Outputs:  Tables/table_s31.tex (Table S31: Study 2 ATEs by sample)
              Tables/table_s32.tex (Table S32: adjusted ATEs Study 2)
              Tables/table_s33.tex (Table S33: ATEs by vignette type)
              Figures/fig_s15.pdf  (Figure S15: ATEs by vignette type)

10_si_s2_practitioner_heterogeneity.R
    Purpose:  Treatment effect heterogeneity for Study 2 using Generalized
              Random Forests, including CATE subgroup analysis for the
              Substantive v. Generic contrast in Australia.
              Corresponds to SI Section S2.3.1.
    Inputs:   combined_data.rds (via 00_setup.R)
    Outputs:  grf_calibration_au_study2.rds
              grf_preds_au_study2.rds
              grf_calibration_us_study2.rds
              grf_preds_us_study2.rds
              Figures/fig_s16.pdf  (Figure S16: CATE predictions, Australia)
              Figures/fig_s17.pdf  (Figure S17: CATE predictions, US)
              Tables/table_s34.tex (Table S34: BLP calibration Study 2)
              Tables/table_s35.tex (Table S35: CATE subgroups, Australia)

================================================================================
Datasets
================================================================================

Primary dataset:

  combined_data.rds
      Combined survey data for Study 1 (audience effects) and Study 2
      (practitioner effects) from Australia and the United States.
      Treatment indicator: Z_land_info (Study 1), Z_vignette_a/b (Study 2).
      Sample indicator: sample ("AU" or "US").

Supplementary datasets:

  aus_target.rds
      Australian population target marginals for survey weighting.

  usa_target.rds
      US population target marginals for survey weighting.

  aes_2022.rds
      Australian Election Study (2022) for demographic benchmarking.

  au_election_polls.rds
      Australian election polling data for party support benchmarking.

  au_national_polls.rds
      Australian national polling data for attitude benchmarking.

  anes_2024.rds
      American National Election Study (2024) for demographic benchmarking.

  ces_2024.rds
      Cooperative Election Study (2024) for demographic benchmarking.

  asx_results_2019to2024.rds
      Corporate annual report text analysis results (ASX-listed companies,
      2019-2024) for land acknowledgment prevalence analysis.

  unis_and_museums.rds
      Institutional adoption records (universities and museums) for
      Figure 1 trend analysis.

  expert_survey.rds
      Expert survey of academics on predicted effects of land acknowledgments.

================================================================================
Replication Instructions
================================================================================

1. Set your R working directory to this replication folder:
     setwd("path/to/replication")

2. Install all required packages (see Software Requirements above).
   GitHub packages require:
     install.packages("devtools")
     devtools::install_github("swager/crossEstimation")
     devtools::install_github("ehkennedy/npcausal")
     devtools::install_github("aaronrudkin/autumn")

3. Run scripts in numerical order:
     source("00_setup.R")      # Loaded automatically by each script
     source("01_manuscript.R") # Run first — creates pipeline file for 06
     source("02_si_s1_demographics.R")
     source("03_si_s1_measurement.R")
     source("04_si_s1_prevalence_expert.R")
     source("05_si_s2_baseline.R")
     source("06_si_s2_audience_effects.R")  # Depends on 01
     source("07_si_s2_audience_heterogeneity.R")
     source("08_si_s2_audience_iv.R")       # Depends on 06
     source("09_si_s2_practitioner_effects.R")
     source("10_si_s2_practitioner_heterogeneity.R")

   Note: Scripts 02-05, 07, 09, and 10 are independent of each other and
   can be run in any order after 01. Script 06 requires output from 01;
   script 08 requires output from 06.

4. All figures are saved to the Figures/ subfolder and all tables to the
   Tables/ subfolder. Intermediate .rds files used by downstream scripts
   are saved to the root replication folder.

================================================================================
Output Mapping: Script -> Manuscript/SI Location
================================================================================

Manuscript:
  Figure 1   <- 01_manuscript.R -> Figures/fig1.pdf
  Figure 2   <- 01_manuscript.R -> Figures/fig2.pdf
  Figure 3   <- 01_manuscript.R -> Figures/fig3.pdf
  Figure 4   <- 01_manuscript.R -> Figures/fig4.pdf
  Table 1    <- 01_manuscript.R -> Tables/table1.tex

Supplementary Information:
  SI S1.1 (Demographics)            <- 02_si_s1_demographics.R
  SI S1.3.1, S1.4.1 (Measurement)  <- 03_si_s1_measurement.R
  SI S1.5.1, S1.5.2, S1.7          <- 04_si_s1_prevalence_expert.R
    (Prevalence and expert survey)
  SI S2.1 (Baseline)                <- 05_si_s2_baseline.R
  SI S2.2 (Study 1 ATEs)            <- 06_si_s2_audience_effects.R
  SI S2.2.1 (Study 1 heterogeneity) <- 07_si_s2_audience_heterogeneity.R
  SI S2.2.2 (Study 1 IV/LATE)       <- 08_si_s2_audience_iv.R
  SI S2.3 (Study 2 ATEs)            <- 09_si_s2_practitioner_effects.R
  SI S2.3.1 (Study 2 heterogeneity) <- 10_si_s2_practitioner_heterogeneity.R

================================================================================
